<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags"  prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>网站会员管理</title>
		<link rel="stylesheet" type="text/css" href="../css/style1.css" />
		<link rel="stylesheet" type="text/css" href="../css/base.css" />
		<link rel="stylesheet" type="text/css" href="../css/indexbody.css" />
		<script type="text/javascript" src="../js/frame.js"></script>
		<script type="text/javascript" src="../js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	window.onload=function(){
		document.getElementById("hide").style.display="none";
			document.getElementById("sc").style.display="none";
			document.getElementById("vip").style.display="block";
			document.getElementById("mb").style.display="none";
			document.getElementById("sys").style.display="none";
}
	function doDelete(id){
		  	if (confirm("你确实要删除(ID:"+id+")这个会员?")) {
				location.href="<%=path %>/manager/vip/deleteUserAction.action?id="+id;
			}
	  	}
	//反选
	function ReSel() {
		$(":checkbox").each(function() {
			$(this).attr("checked", !this.checked);
		});
	}

	//全选
	function SelAll() {
		$(":checkbox").each(function() {
			$(this).attr("checked", true);
		});
	}

	//取消
	function NoneSel() {
		$(":checkbox").each(function() {
			$(this).attr("checked", false);
		});
	}
function doBatchDelete(){
		  	if (confirm("你确实要批量删除这些会员?")) {
				location.href="<%=path %>/manager/vip/batchDeleteUsersAction.action";
			}
	  	}
	  	
</script>
<style type="text/css">
.rb{ border-right:1px solid #666666 }
.tb{ border-top:1px solid #666666 }
</style>
</head>
<body background='../images/allbg.gif' leftmargin='8' topmargin='8'>
 <div id="container">
       <jsp:include page="../header.jsp"></jsp:include>
        <div style="float:left; width:195px; height: 550px">
        	<jsp:include page="../leftnav.jsp"></jsp:include>
        </div>
       <div style="float:left; overflow-y:scroll; overflow-x:hidden; width: 785px; height: 550px;">
       
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" style="margin-bottom:6px">
  <tr>
    <td height="30" align="center" bgcolor="#F9FCEF"> 
  <form action="<%=path %>/manager/vip/searchUserAction.action" name="form1" method="post">
	  <table border="0" cellspacing="0" cellpadding="3" style=" float: right; margin-right: 10px;">
     <tr>
          <td>
          关键字：</td>
          <td>
          <!-- <input name="users.userName" type="text" id="keyword" size="12" style="width:120px" value="" /> -->
          	<s:textfield name="users.userName" theme="simple"></s:textfield>
          </td>
          <td>
        <s:select list="{'性别','男','女','保密'}" name="users.sex" theme="simple" ></s:select>
		      <!--  <select name="users.sex" id="sex" style="width:60px">
               <option value=''>性别</option>
               <option value="男">男</option>
               <option value="女">女</option>
               <option value="保密">保密</option>
             </select>  -->
          </td>

          <td>
          <s:select list="userTypeList" name="users.userType.id" headerKey="0" headerValue="--会员状态--" listKey="id" listValue="userType" theme="simple"></s:select>
		    <!--<select name="users.userType.id" id="spacesta" style="width:150px">
              <option value='0'>--会员状态--</option>
              <s:iterator value="userTypeList">
              <option value='<s:property value="id"/>'><s:property value="userType"/></option>
              </s:iterator>
            </select>--></td>
         <td>
           <input name="imageField" class="np" type="image" src="../images/button_search.gif" width="60" height="22" border="0" />
          </td>
        </tr>
      </table>
	  </form>
    </td>
  </tr>
</table>
<form name="form2">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#cfcfcf">
  <tr> 
  <td height="28" colspan="9" background="../images/tbg.gif">
   <table width="99%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td width="29%" style="padding-left:10px;"><strong>注册会员列表</strong></td>
       <td width="71%" align="right">
          <a href="<%=path %>/manager/vip/userAllAction.action">所有会员</a>
        
       </td>
     </tr>
  </table>
 </td>
</tr>
  <tr bgcolor="#FEFCEF" height="30" align="center"> 
    <td width="3%">选择</td>
    <td width="5%">mid</td>
    <td width="11%">登录名</td>
    <td width="16%">email/昵称</td>
    <td width="5%">性别</td>
    <td width="8%">会员等级</td>
    <td width="20%">会员属性</td>
    <td>操作</td>
  </tr>
 <s:iterator value="userList" >
<tr height="26" align="center" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';"> 
  <td><input name="checksbox[]" type="checkbox" value="<s:property value='id'/>" class="np" /></td>
  <td><s:property value="id" /></td>
  <td><a href="" target='_blank'>
    <u><s:property value="userName" /></u>  </a></td>
	<td>
	  昵称：<s:property value="userName" />	</td>
  <td>
  	<s:property value="sex" />  </td>
  <td>
  	<a href="<%=path %>/manager/vip/userAction.action"><s:property value="userType.userType"/></a>
  </td>
  <td>
  	个人用户 &nbsp;<font color='red'>[<s:property value="userType.userType"/>]</font><br />
  	 积分：<s:property value="integral"/>  </td>
  <td align="center">
    <a href="<%=path %>/manager/vip/findUserByIdInfoAction.action?id=<s:property value='id'/>">修改</a> | 
    <a href="javascript:doDelete('<s:property value='id'/>')">删除</a> |
    <a href="../core/content.jsp" target="_blank">文档</a>
  </td>
</tr>
 </s:iterator>
<tr bgcolor="#ffffff"> 
 <td height="36" colspan="9">
	&nbsp;
	<a href="javascript:SelAll()" class="coolbg">全选</a>
	<a href="javascript:ReSel()" class="coolbg">反选</a>
	<a href="javascript:NoneSel()" class="coolbg">取消</a>
	<a href="javascript:doBatchDelete()" class="coolbg">&nbsp;删除&nbsp;</a>
 （如果已经整合了论坛的用户请不要使用批量删除功能）</td>
</tr>
<tr bgcolor="#F9FCEF"> 
 <td height="36" colspan="9" align="center">
	<span>共 1 页/1条记录</span>
 </td>
</tr>
</table>
</form>
       		
       </div>
    </div>
</body>
</html>